package csc420groupproject;

import java.awt.Color;
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
import javax.swing.UIManager;

/**
 *
 * @author drenz
 */
public class CustomListCellRenderer extends DefaultListCellRenderer {

    @Override
    public Component getListCellRendererComponent(JList list,
                                                  Object value,
                                                  int index,
                                                  boolean isSelected,
                                                  boolean cellHasFocus)
    {
        // for default cell renderer behavior
        Component c = (Component) value;
        c.setForeground(Color.WHITE);
        c.setBackground(isSelected ? new Color(150, 200, 250) : Color.WHITE);
        return c;
    }

}
